exports.create = (app) => {
  const userING = async (req, res) => {
    const { username, password } = req.query
    try {
      console.log(req.query)
      const user = await app.count({
        where: {
          username,
          password
        },
      });
      if (user > 0) {
        res.status(200).json({ message: "User exists" })
      } else {
        res.status(404).json({ message: "User not found" })
      }
    } catch (error) {
      console.error(error)
      res.status(500).json({ error: "Failed to fetch user" })
    }
  }
  return userING;
}

